package com.modai.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.lang.NonNull;


import java.util.List;

/**
 * @author ：modai
 * @date ：Created in 2021-6-5 18:22
 * @description：用户实体
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
    private Integer id;
    @NonNull
    private String name;
    @NonNull
    private String password;
    private List<Role> roles;

    public User(@NonNull String name, @NonNull String password, List<Role> roles) {
        this.name = name;
        this.password = password;
        this.roles = roles;
    }
}
